package com.demo.study.java.abstractTest;

import java.util.List;

public class ImpalaCreateTableStatement extends CreateTableStatement{


    public ImpalaCreateTableStatement(String database, String table, List<String> columns) {
        super(database, table, columns);
    }


    /**
     * 子类重写具体的 业务逻辑
     * @return
     */
    @Override
    public String generateCreateTableStatement() {
        StringBuilder createTableStatement = new StringBuilder();
        createTableStatement.append("CREATE TABLE ");
        createTableStatement.append(database);
        createTableStatement.append(".");
        createTableStatement.append(table);
        createTableStatement.append(" (");
        createTableStatement.append(formatColumns());
        createTableStatement.append(")");
        return createTableStatement.toString();
    }
}
